1. Technical Field
The present invention is directed to secure communications networks. More specifically, the present invention is directed to a method, system and apparatus for ascertaining that only randomly generated numbers that have passed a test are used in encrypting and decrypting data.
2. Description of Related Art
The Internet is being used more and more to transact sensitive information. Sensitive information includes proprietary documents, credit card information, financial data or any data or information that a user may not want the public at large to obtain. The Internet, however, is an open network environment and thus requires a high level of security to ensure that sensitive information remains private. To provide the requisite security, encryption is used.
When data is encrypted, the data is ciphered. To decipher the data, a secret key or password is used. Specifically, when two computer systems have to transfer sensitive information to each other over the Internet, they do so by opening a Secure Socket Layer (SSL) connection. SSL is a security protocol that uses a public key to encrypt data and a private key to decrypt the encrypted data. The public key can be obtained from the computer systems themselves while the private key is kept secret. For example, when a client system needs to establish a secure connection with a server (or with any other computer system for that matter), it contacts the server to indicate so. The server then generates a public key/private key pair and passes the public key to the client. Using the public key, the client encrypts the sensitive data that is to be transferred to the server. Only the server has the corresponding private key to decrypt the encrypted data.
The client may also generate its own public key/private key pair and pass the public key to the server. The server will then encrypt all sensitive information that is to be transferred to the client using the client's public key. As in the case of the server, only the client has the private key with which the encrypted data may be decrypted.
As is well known in the field, to generate public key/private key pairs, random number generators (RNGs) are used. However, computer systems are deterministic devices. That is, for every input there is a particular output and thus, true random number generators (TRNGs) are difficult to implement. Consequently, pseudo-random number generators (PRNGs) are mostly used. A PRNG uses a seed (a random stream of bits that is used to generate a usually longer stream of bits) to produce numbers that have a random distribution of bits. Hence, the seeds used to generate the numbers have to themselves be random in order for the generated numbers to be random.
In any event, because security protocols, such as SSL, rely on the unpredictable nature of the keys they use, RNGs must meet stringent requirements. One of those requirements is that users who are bent on breaking encryption code (i.e., attackers, as known in the field), including those who know the RNG design, must not be able to make any useful predictions about the generated numbers. Thus, to ensure that is indeed so, each number generated by an RNG is tested for its relative unpredictability. If the number passes the test, it is used; otherwise, it is discarded. Most RNGs use an integrated hardware device known as a built-in self-test or BIST to perform the test.
Presently, RNG cores that contain an RNG and a BIST hardware are being manufactured and sold. The RNG cores have two outputs, a test status line to provide the status of the test and a data line to provide the generated number. To implement a cryptographic module, both the test status line and the data line have to be connected to a cryptographic device (i.e., the device performing the cryptographic functions).
Using a test status line to provide the result of the test and a data line to provide the data to the cryptographic device may not be an ideal configuration. For example, suppose the BIST outputs a logical one (1) to indicate that a number has passed the test and a logical zero (0) to indicate that it has failed the test. Suppose further that due to a mechanical, electrical or any other problem including an attacker-induced problem, the test result always comes out as a one (1). If a generated number did not pass the test, the cryptographic device will nonetheless use the number. Hence, if the seeds used are a recurring sequence of numbers, an attacker may be able to predict the corresponding generated numbers and thus the cryptographic keys based on previously observed recurring sequences of numbers.
Alternatively, if due to any of the problems mentioned above, the RNG core constantly outputs a particular number or a sequence of numbers. Further, if the numbers that have actually passed the test are different from the numbers transferred. Then, the cryptographic device will use the transferred numbers. Thus, an attacker may be able to predict the numbers based on previously observed recurring numbers or sequences of numbers.
Thus, what is needed is a method, system and apparatus for ensuring that only generated random numbers that have truly passed a BIST are used for encryption purposes.